//
//  LBBlendFilter.mm
//  OpenGLGame
//
//  Created by Nguyen Cong Huy on 3/29/13.
//  Copyright (c) 2013 UIT. All rights reserved.
//

#include "LBBlendColorFilter.h"
#include "LBGraphics.h"

LBBlendColorFilter::LBBlendColorFilter(){
    
}

void LBBlendColorFilter::setColor(float red, float green, float blue){
    color[0] = red;
    color[1] = green;
    color[2] = blue;
    LBGraphics::getInstance()->useProgram(program);
    glUniform4f(colorUniform, red, green, blue, 1.0);
}

void LBBlendColorFilter::setOpactiy(float opacity){
    this->opacity = opacity;
    LBGraphics::getInstance()->useProgram(program);
    glUniform1f(opacityUniform, opacity);
}